package org.jivesoftware.smackx.pubsub;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.jivesoftware.smack.packet.PacketExtension;

public class ConfigurationEvent extends NodeExtension
  implements EmbeddedPacketExtension
{
  private ConfigureForm form;

  public ConfigurationEvent(String paramString)
  {
    super(PubSubElementType.CONFIGURATION, paramString);
  }

  public ConfigurationEvent(String paramString, ConfigureForm paramConfigureForm)
  {
    super(PubSubElementType.CONFIGURATION, paramString);
    this.form = paramConfigureForm;
  }

  public ConfigureForm getConfiguration()
  {
    return this.form;
  }

  public List<PacketExtension> getExtensions()
  {
    List localList;
    if (getConfiguration() == null)
      localList = Collections.EMPTY_LIST;
    while (true)
    {
      return localList;
      PacketExtension[] arrayOfPacketExtension = new PacketExtension[1];
      arrayOfPacketExtension[0] = getConfiguration().getDataFormToSend();
      localList = Arrays.asList(arrayOfPacketExtension);
    }
  }
}